package com.vdong.redis.data.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * Description: redis配置
 *
 * @author <a href="mailto:clf@vdongzc.com">clf</a>
 * @Date Create on 2019年01月17日
 * @since version1.0
 */
@Component
public class VdongRedisClusterProperties {

    @Value("${redis.cluster.jedisPoolConfig.maxTotal}")
    private int maxTotal;

    @Value("${redis.cluster.jedisPoolConfig.maxIdle}")
    private int maxIdle;

    @Value("${redis.cluster.jedisPoolConfig.maxWaitMillis}")
    private int maxWaitMillis;

    @Value("${redis.cluster.jedisPoolConfig.testOnBorrow}")
    private Boolean testOnBorrow;

    @Value("${redis.cluster.jedisPoolConfig.testOnReturn}")
    private Boolean testOnReturn;

    @Value("${redis.cluster.timeout}")
    private int timeout;

    @Value("${redis.cluster.nodes}")
    private String nodes;

    @Value("${redis.cluster.maxRedirects}")
    private int maxRedirects;

    @Value("${redis.cluster.testWhileIdle}")
    private Boolean testWhileIdle;

    public int getMaxTotal() {
        return maxTotal;
    }

    public void setMaxTotal(int maxTotal) {
        this.maxTotal = maxTotal;
    }

    public int getMaxIdle() {
        return maxIdle;
    }

    public void setMaxIdle(int maxIdle) {
        this.maxIdle = maxIdle;
    }

    public int getMaxWaitMillis() {
        return maxWaitMillis;
    }

    public void setMaxWaitMillis(int maxWaitMillis) {
        this.maxWaitMillis = maxWaitMillis;
    }

    public Boolean getTestOnBorrow() {
        return testOnBorrow;
    }

    public void setTestOnBorrow(Boolean testOnBorrow) {
        this.testOnBorrow = testOnBorrow;
    }

    public Boolean getTestOnReturn() {
        return testOnReturn;
    }

    public void setTestOnReturn(Boolean testOnReturn) {
        this.testOnReturn = testOnReturn;
    }

    public int getTimeout() {
        return timeout;
    }

    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    public String getNodes() {
        return nodes;
    }

    public void setNodes(String nodes) {
        this.nodes = nodes;
    }

    public int getMaxRedirects() {
        return maxRedirects;
    }

    public void setMaxRedirects(int maxRedirects) {
        this.maxRedirects = maxRedirects;
    }

    public Boolean getTestWhileIdle() {
        return testWhileIdle;
    }

    public void setTestWhileIdle(Boolean testWhileIdle) {
        this.testWhileIdle = testWhileIdle;
    }
}
